//
//  VehicleAdditionAPI.m
//  StarOrangeStaff
//
//  Created by lshenrong on 2020/7/13.
//  Copyright © 2020 lshenrong. All rights reserved.
//

#import "VehicleAdditionAPI.h"

@interface VehicleAdditionAPI ()


@property (nonatomic,copy) NSString *seriesId;
@property (nonatomic,copy) NSString *carYear;
@property (nonatomic,copy) NSString *carColor;
@property (nonatomic,copy) NSString *carLevel;
@property (nonatomic,copy) NSString *seatNum;
@property (nonatomic,copy) NSString *carLicense;
@property (nonatomic,copy) NSString *licenseTime;

@property (nonatomic,copy) NSString *is2license;
@property (nonatomic,copy) NSString *yzLicense;

@property (nonatomic,assign) double price;
@property (nonatomic,copy) NSString *preCareTime;
@property (nonatomic,copy) NSString *safeEndTime;
@property (nonatomic,copy) NSString *nextReviewTime;

@property (nonatomic,copy) NSString *kilometers;
@property (nonatomic,copy) NSString *rentType;
@property (nonatomic,copy) NSString *rentStartDate;
@property (nonatomic,copy) NSString *tdStartTime;
@property (nonatomic,copy) NSString *rentEndDate;
@property (nonatomic,copy) NSString *tdEndTime;
@property (nonatomic,copy) NSString *driverId;



@end

@implementation VehicleAdditionAPI

- (instancetype)initWithCarSeriesId:(NSString *)seriesId {
    if (self = [super init]) {
        self.seriesId = seriesId;
        [self testDataAPI];
       
    }
    return self;
    
}

- (void)testDataAPI {
    self.seriesId = @"3";
    self.carYear = @"2019";
    self.carColor = @"1";
    self.carLevel = @"1";
    self.seatNum = @"1";
    self.carLicense = @"粤A21313";
    self.licenseTime = @"2019-09";
    self.is2license = @"1";
    self.yzLicense = @"粤Z21313";
    self.price = 321000;
    self.preCareTime = @"2019-09-01";
    self.safeEndTime = @"2019-09-01";
    self.nextReviewTime = @"2019-09-01";
    self.kilometers = @"8000";
    self.rentType = @"1";
    self.rentStartDate = @"2019-09-01";
    self.rentEndDate = @"2019-09-01";
    self.tdStartTime = @"08:30";
    self.tdEndTime = @"10:30";

    self.driverId = @"10";


}

- (NSString *)requestUrl {
    return @"message/car/addCarInfo";
}



- (id)requestAppendArgument{
//    AvoidNullString(self.userName);
//    AvoidNullString(self.cardId);
//    AvoidNullString(self.address);
//    AvoidNullString(self.onboardingDate);
//    AvoidNullString(self.remark);
    
     return @{
                @"carDetail": @{
                        @"seriesId":self.seriesId,
                        @"carYear":self.carYear,
                        @"carColor":self.carColor,
                        @"carLevel":self.carLevel,
                        @"seatNum":self.seatNum,
                        @"carLicense":self.carLicense,
                        @"licenseTime":self.licenseTime,
                        @"is2license":self.is2license,
                        @"yzLicense":self.yzLicense,
                        @"price":@(self.price)
                       },
                
               @"carServiceRecord": @{
                        @"preCareTime":self.preCareTime,
                        @"safeEndTime":self.safeEndTime,
                        @"nextReviewTime":self.nextReviewTime,
                        @"kilometers":self.kilometers
                       },
                
             @"carRentDefault": @{
                        @"rentType":self.rentType,
                        @"rentStartDate":self.rentStartDate,
                        @"rentEndDate":self.rentEndDate,
                        @"tdStartTime":self.tdStartTime,
                        @"tdEndTime":self.tdEndTime
                       },
                
            @"carDriverRel": @{
                           @"driverId":self.driverId
                       }
       };
}



@end
